import service from "..";

export function addFoodInfo(data) {
    return service({
        url: '/dishesManagement/addOrUpdateDishes',
        method: 'post',
        data
    })
}

export function uploadFile(data) {
    return service({
        url: '/file/upload',
        method: 'post',
        data
    })
}

export function getTablePage(data) {
    return service({
        url: '/dishesManagement/dishesPage',
        method: 'post',
        data
    })
}

export function delFoodInfo(params) {
    return service({
        url: '/dishesManagement/dishesDelete',
        method: 'post',
        params
    })
}

export function categoryNameList() {
    return service({
        url: '/dishesManagement/categoryNameList',
        method: 'post',
    })
}

//更改状态
export function changeFoodState(params) {
    return service({
        url: '/dishesManagement/changeDishesStatus',
        method: 'post',
        params
    })
}

export function getHomeInfo(data) {
    return service({
        url: '/business/homeStatistics',
        method: 'post',
        params:data
    })
}